package com.zuoban.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.zuoban.common.Result;
import com.zuoban.constant.HttpStatus;
import com.zuoban.dto.SysLogQuery;
import com.zuoban.entity.sys.SysLog;
import com.zuoban.mapper.SysLogMapper;
import com.zuoban.service.SysLogService;
import com.zuoban.util.CurrentUser;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Objects;

/**
 * @BelongsProject: zuoban-boot
 * @BelongsPackage: com.zuoban.service.impl
 * @Author: zxy
 * @CreateTime: 2022-10-10  14:24
 * @Description: ...
 */
@Service
@RequiredArgsConstructor
public class SysLogServiceImpl implements SysLogService {

    private final SysLogMapper sysLogMapper;

    @Override
    public Result listLog(SysLogQuery logQuery) {
        List<SysLog> sysLog = sysLogMapper.listLog(logQuery, CurrentUser.getUserId());
        return new Result(HttpStatus.HTTP_OK,"请求成功",sysLog);
    }
}
